var xiaoming = {
    name: '小明',
    birth: 1990,
    age: function (){
        var y= new Date().getFullYear();
        return y - this.birth;
    }
};

function getAge(){
        var y= new Date().getFullYear();
        return y - this.birth;
    }
var xiaoming1 = {
    name: '小明',
    birth: 1990,
    age: getAge,
};

var a = Math.max.apply(null,[3, 5, 4]);
var c = Math.max.call(null,3, 5, 4);
console.log(xiaoming.age + '  //function xiaoming.age()');
console.log(xiaoming.age + '  //function getAge()');
console.log(xiaoming.age() + '  //今年调用是27,明年调用就变成28了');
console.log(getAge.apply(xiaoming1,[]) + '  //调用函数本身的apply方法,getAge.apply(xiaoming1,[])参数为空');
console.log(a  + ' 调用apply方法');
console.log(c  +' 调用call方法');